import store from './redux/store'
export default function testConnect(callback,funcobj){
    let value=callback(store.getState())    //获取值

    let dispatchObj={}
    for (let key in funcobj){
        dispatchObj[key]=()=>{store.dispatch(funcobj[key]())}
    }

    return (Mycomponent)=>{
        return (props)=>{                   //若组件外层有包裹，接收
            return <div>
                <Mycomponent {...value} {...dispatchObj} {...props}/>
            </div>
        }
    }
}